<!--确认完工-->
<!doctype html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<link href="../css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="../css/order.css"/>
</head>
<body class="white">
	<div class="mui-content detail loading" id="vueMain">
		<ul class="mui-table-view">
	        <li class="mui-table-view-cell tls">
	        		NO.{{list.order}}
	        </li>
	        <li class="mui-table-view-cell mui-media">
	        		<a href="javascript:;">
    		            <img class="mui-media-object mui-pull-left" :src="list.img" />
    		            <div class="mui-media-body">
    		                <div class="name">{{list.name}}</div>
    		                <p v-if="list.stro"><span class="mui-pull-right"></span>已选：{{list.stro}}</p>
    		                <p>数量:{{list.amount}}</p>
    		                 <p class="total">总金额: <span >¥ {{list.order_amount}}</span> </p>
    		            </div>
    		        </a>
	        </li>
    		</ul>	
    		<div class="item">
	    		<div class="mui-content-padded">
	    			<div class="box">
	    				<div class="tile">完工验证码</div>
	    				<div class="tips">完工验证码已在客户支付全款后发往客户注册手机请在完工后向客户索取</div>
	    				<input type="number" class="verifyCode" name="" id="" v-model="code" />
	    			</div>
	    		</div>
	    	</div>
	    	
	    	 <div class="mui-content-padded" style="padding: 25px 0;">
	    		<button type="button" class="mui-btn mui-btn-block bexta-btn bexta-btn-red tijiao" >确定</button>
	    </div>
	    	
	</div>
<script src="../js/mui.js"></script>
<script src="../js/vue.min.js"></script>
<script src="../js/bexta.js"></script>
<script type="text/javascript">
	var apps, views, merchant;
	mui.init()
	mui.plusReady(function () {
	   views = bexta.getWebview();
	   merchant = bexta.getStorage(MERCHANT);
	   apps = new Vue({
	   		el:"#vueMain",
	   		data:{
	   			list:views.list,
	   			code:''
	   		},
	   		mounted:function(){
	   			document.querySelector('.loading').classList.add('loadRun');
	   			var self = this;
	   			document.querySelector('.tijiao').addEventListener('tap', function(){
	   				if( self.code == '' ){
	   					mui.toast("请输入完工验正码");
	   					return ;
	   				}
	   				bexta.ajax(api.over_order, function(res,msg){
	   					mui.toast(msg);
		 	  			if( !res ){
		 	  				mui.fire(views.opener().opener(), 'reloading')
							views.opener().close('none');
							mui.later(function(){
								mui.back();
							}, 500);
		 	  			}
	   				}, {data:{uid:merchant.uid, order_no:self.list.order, code:self.code}});
	   			});
	   		}
	   });
	});
</script>
</body>
</html>